package com.gqz.file.service;

import com.gqz.file.utils.OssUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
@Primary
public class OssFileServiceImpl implements ISysFileService {
    @Autowired
    private OssUtils ossUtils;

    @Override
    public String uploadFile(MultipartFile file) throws Exception {
        String path = ossUtils.uploadObjectOSS(file.getOriginalFilename(), file.getInputStream());
        return path;
    }
}
